<template>
    <div>
        {{ content }}
        <button @click="handleChange">改变内容</button>
    </div>
</template>
<script>
    export default {
        data: function () {
            return {
				content: "原有内容"
            }
        },
        methods: {
            handleChange() {
				/* var data = {
					username:'admin',
					password:'123'
				} */
				var data = 'username=admin&password=123';
                this.$ajax.post('http://localhost:8080/api/login',true,data,this.callback);
            },
			callback(text){
				this.content = text;
			}
        }
    }
</script>
